The present invention relates to industrial controllers for the real time control of industrial processes and in particular to a clock circuit that permits precise coordination of actions among different industrial controllers.
Industrial controllers are special purpose computers used for controlling industrial processes and manufacturing equipment. Under the direction of a stored program, the industrial controller examines a series of inputs reflecting the status of the controlled process and changes a series of outputs to control the industrial process. The inputs and outputs may be binary, that is on or off, or analog providing a value within a continuous range of values.
An industrial controller differs from a conventional computer in that the various components of the industrial controller may be separated by a considerable distance commensurate with the expanse of a large factory or manufacturing operation. The separated industrial controllers communicate via digital messages transmitted over one or more communication links.
These links necessarily introduce a delay in the communication between controllers depending on the distance between controllers and the amount of message traffic. In order to reduce this delay, time critical messages may be assigned a high priority on the link, where high priority messages obtain use of the shared communication media in preference to low priority messages. Normally, however, the proportion of the message carrying capacity of the communication link allocated to high priority messages is limited to ensure that low priority messages will also be ensured reliable transmission. As a result, a typical message between controllers will experience a significant and often unpredictable delay.
It is known to moderate the effects of this delay by providing each controller with an accurate clock to which control activities may be synchronized across the entire network of controllers. For example, a control event may be linked with a time of execution and transmitted in a control message to the various controllers before the time the control event must be performed. The actual execution of the control event is then triggered by the clock of each controller without concern about the time or receipt of the control message. Likewise, data being accepted by a given controller may be "time stamped" with the value of the controller's clock so that the data's precise time of arrival may be determined by another controller, even though the message transmitted to the other controller may be delayed.
For this approach to be successful, the clock used by a controller must be synchronized precisely with the clocks of the other controllers. This can be done by transmitting among all controllers a time synchronization signal. The signal may be transmitted with very high priority so as to the extent practical to cause each industrial controller to receive the synchronization signal at the same time so that it may update the value on its clock.
The time synchronization signal is transmitted only occasionally and the clocks allowed to run free between such update times so that transmission of the synchronization signal does not usurp the entire bandwidth of the communication link devoted to high priority signals.
U.S. Pat. No. 5,661,700 assigned to the assignee of the present invention and hereby incorporated by reference recognized that the periodic updating of a local clock of a controller can be disruptive if the clock has drifted sufficiently between updating times so that the process of the updating causes some time values to be skipped. An instruction intended to be executed at one of the skipped times value would in this case never be executed. Accordingly, the above patent teaches an updating process using two clocks, the first clock which is updated abruptly at the update time, and the second clock which is gradually adjusted during the interval between update times to reduce the error between itself and the first clock. Under this system no time values are skipped.
With increasing demands for high accuracy industrial control, the deviation of clocks that are allowed to free-run is no longer acceptable. Nevertheless, the alternative of providing more frequent update periods is undesirable because of the burden it places on the communication links.